import axios from 'axios'
import Vue from 'vue';
const http = axios.create ({
    // baseURL : 'http://1.116.162.146:8080'
    baseURL : '/api'
})


http.interceptors.response.use(
    response => {
        console.log(response);
      if (response.data.code !== 200) {
        Vue.prototype.$toast(response.data.msg);
      }
      return response;
    },
    error => {
      return Promise.reject(error);
    }
  );

export default  http 

